package com.hp.jus;

import java.util.Properties;

/**
 * the factory loads the Jusser with the configuration file
 * and serves a singlton of the jusser class
 * @author salemmo
 *
 */
public class JusFactory {
	
	private static Jusser jusser;
	
	private JusFactory(){
		
	}
	
	public static Jusser getInstance()throws Exception{
		if(jusser==null)
		{
			Properties props = new Properties();
			props.load(JusFactory.class.getClassLoader().getResourceAsStream("jusser.properties"));
			jusser = new Jusser(props);
		}
		return jusser;
	}
	
}
